Problem Navigating Incoming Links From A Named Link Module

Hi,

I have a script that for each object in a module accesses all incoming linked objects (part of the script is shown below). This script works well but now i want to modify it so that it accesses linked objects through a single named link module. In the script below i changed "*" to "Verifies" as this is the name of the linked module. When i ran the script it displayed no data at all, it should have displayed some data. Running the modified script generated no DXL errors. So is the syntax correct for the link module name or does the script need to do something additional for the named link module that it doesn't need to do when navigating all links ?

Object stgt = source (tlnk)
LinkRef cms1TOvs
string srcModName
for cms1TOvs in stgt <- "*" do
{
srcModName = fullName source (cms1TOvs)
read (srcModName, false) // open linked modules
}
Link vlnk
for vlnk in stgt <- "*" do // for each link to rqmt object
{
Module v = read(fullName source (vlnk),false)
//REST OF THE SCRIPT IS CONTAINED HERE
}
zenyk - Tue Jan 19 09:49:30 EST 2010

Re: Problem Navigating Incoming Links From A Named Link Module
Peter_Albert - Tue Jan 19 10:40:26 EST 2010

Possibly the link module is in a different folder? Try the full name of "Verifies" including its path.

Regards,

Peter

Re: Problem Navigating Incoming Links From A Named Link Module
zenyk - Tue Jan 19 11:35:08 EST 2010

Peter_Albert - Tue Jan 19 10:40:26 EST 2010
Possibly the link module is in a different folder? Try the full name of "Verifies" including its path.

Regards,

Peter

Hi Peter,

Your suggestion fixed the problem. The modified script now works.
Thanks for your help.

Regards

Zenyk

Re: Problem Navigating Incoming Links From A Named Link Module
llandale - Tue Jan 19 18:13:24 EST 2010

I gave up dealing with specific link modules in the link loop. I routinely now do this:

for lnk in obj <-"*" do
{  Module mod = module(lnk)
   string NameFull = fullName(mod)
   string NameBase = name(mod)
   if (NameFull or NameBase isn't what I want) continue
   ...
}

 

 

  • Louie

 

 

Re: Problem Navigating Incoming Links From A Named Link Module
Peter.Dawson - Tue Jan 19 19:52:09 EST 2010

llandale - Tue Jan 19 18:13:24 EST 2010

I gave up dealing with specific link modules in the link loop. I routinely now do this:

for lnk in obj <-"*" do
{  Module mod = module(lnk)
   string NameFull = fullName(mod)
   string NameBase = name(mod)
   if (NameFull or NameBase isn't what I want) continue
   ...
}

 

 

  • Louie

 

 

Hi Louie

If you are going to do that, what then is the point of having specific link modules for different categories of links? Wouldn't that encourage users to just use DOORS Links?

Cheers

Re: Problem Navigating Incoming Links From A Named Link Module
llandale - Wed Jan 20 11:26:15 EST 2010

Peter.Dawson - Tue Jan 19 19:52:09 EST 2010
Hi Louie

If you are going to do that, what then is the point of having specific link modules for different categories of links? Wouldn't that encourage users to just use DOORS Links?

Cheers

I said I gave up dealing with the different link module names IN THE LOOP.
I don't do this: for lnk in obj<-"some name" do.
I always do this: for lnk in obj <-"*" do. Then I look at the link module name to figure out if I care about this link; such as if its 'Requirements Links' or 'Verification Links'.

Yes, still use different link module names to distinguish the different types of links.

  • Louie